#ifndef H_PSSolvers
#define H_PSSolvers

#include "Engine.hh"
#include "PSList.hh"
#include <string>

namespace EUROPA 
{
  class PSSolver;
  
  class PSSolverManager : public EngineComponent
  {
    public:
      virtual ~PSSolverManager() {}
    	
      virtual PSSolver* createSolver(const std::string& configurationFile) = 0;            	
  };
  
class PSSolver {
 public:
  virtual ~PSSolver() {}

  virtual void step() = 0;
  virtual bool solve(int maxSteps,int maxDepth) = 0;
  virtual bool backjump(unsigned int stepCount) = 0;
  virtual void reset() = 0;
  virtual void reset(unsigned int depth) = 0;
  virtual void destroy() = 0;
	  
  virtual int getStepCount() = 0;
  virtual int getDepth() = 0;		
  virtual int getOpenDecisionCnt() = 0;	

  virtual bool isExhausted() = 0;
  virtual bool isTimedOut() = 0;	
  virtual bool isConstraintConsistent() = 0;
  virtual bool hasFlaws() = 0;	

  virtual PSList<std::string> getFlaws() = 0;	
  virtual std::string getLastExecutedDecision() = 0;	

  // TODO: should horizon start and end be part of configuration?
  virtual const std::string& getConfigFilename() = 0;	
  virtual eint::basis_type getHorizonStart() = 0;
  virtual eint::basis_type getHorizonEnd() = 0;

  virtual void configure(eint::basis_type horizonStart, eint::basis_type horizonEnd) = 0;
};

}

#endif

